﻿using MQTTnet.Formatter;

namespace Basic.MQTT;

/// <summary>
/// MQTT客户端配置
/// </summary>
public sealed class MqttClientConfig
{
    public string ClientId { get; set; }
    public string Host { get; set; }
    public ushort Port { get; set; }
    public string UserName { get; set; }
    public string Passwd { get; set; }
    public int KeepAlivePeriod { get; set; }
    public bool CleanStart { get; set; } = true;
    public bool SessionNeverExpiry { get; set; }
    public uint? SessionExpiryInterval { get; set; }
    public MqttProtocolVersion ProtocolVersion { get; set; } = MqttProtocolVersion.V500;
}